<div id="hotels-placeholder">
    <div id="wrap" class="clearfix">

        <div id="aside">
		<? $this->load->view('destinations/parts/banner') ?>
		<? $this->load->view('rentacar/parts/map_box') ?>
		<? $this->load->view('parts/two_column') ?>
        </div><!-- / Aside -->

        <div id="main" itemscope itemtype="http://schema.org/LodgingBusiness">

            <!--HOTEL TITLE-->
            <!--HOTEL TOP DESCRIPTION AND POLICES-->
            <div class="details-page clearfix" id="swich_hotel_content" style="display:block">   
				<div class="destinationTitleAndImage">
				<div class="destinationTitle">

					<? if (strpos($destination->name, ' ') !== FALSE) {
					 $pices=explode(" ", $destination->name); ?>
						<h1 itemprop="name"><span><?= $pices[0] ?></span><?
						for($j=1; $j <= count($pices) - 1; $j++)
						{
							echo ' '.$pices[$j];
						}
						?></h1>
					<? } else { ?>
						<h1 itemprop="name"><span><?= $destination->name ?></span></h1>
					<? } ?>

				</div>
                <? $preview=$host_url.'gallery/destinations/'.$destination->photos[0]->path.'/thumb_800x600/'.$destination->photos[0]->photo_name; ?>

                <img itemprop="image" src="<?= $preview ?>" alt="<?= $destination->name ?>" class="details-thumb" width="550">   
				</div>
                <div>
                    <? if($this->lang->lang() == 'ru'): ?>
                            <style type="text/css">
                                dt,dd {
                                    font-size: 11px;
                                }
                                #hotels-placeholder .details-info{
                                    width: 287px;
                                }
                                #hotels-placeholder .details-page .details-info dl dt {
                                    width: 115px;
                                    padding-left: 1px
                                }
                                #hotels-placeholder .details-page .details-info dl dd {
                                    width: 166px;
                                }
                            </style>
                        <? endif; ?>
                <div style="clear:both"></div>                

                <!--INFORMATION-->
                <h2><?= str_replace('{|0|}', $destination->name, lang('details-for')) ?></h2>

                <div class="accomodation-info clearfix" itemprop="description">
                    <?= strip_tags($destination->information, '<p><a><h1><h2><h3><h4><h5><h6><b><strong><br><ul><li>') ?>
                </div>

                <!--GALLERY-->
                <h2><?= lang('details.gallery') ?></h2>

                <ul class="thumb-list">

                    <?
                        if(isset($destination->photos) && count($destination->photos) > 1):
                            array_splice($destination->photos, 0, 1);
                            $counter=1;
                            foreach($destination->photos as $photo):
                                if($counter <= 12):
                                    $thumb=$host_url.'gallery/destinations/'.$photo->path.'/thumb_176x127/'.$photo->photo_name;
                                    $image=$host_url.'gallery/destinations/'.$photo->path.'/thumb_800x600/'.$photo->photo_name;
                                    ?>
                                    <li itemprop="photo" itemscope itemtype="http://schema.org/ImageObject">
										<meta itemprop="contentUrl" content="<?= $image ?>" >
                                        <a class="lightbox" title="<?= $destination->name ?>" href="<?= $image ?>">
                                            <img src="<?= $thumb ?>" alt="<?= $destination->name ?>">
                                        </a>
                                    </li>
                                    <?
                                    $counter++;
                                endif;
                            endforeach;
                        endif;
                    ?>
                </ul>
				</div>

            </div><!-- / Three Columns -->

        </div><!-- / Main -->

    </div><!-- / Wrap -->
</div>

<script type="text/javascript">

    var do_gallery = false;

<? if(count($destination->photos) > 1): ?>
            do_gallery = true;
    <? endif; ?>
</script>